package pres.moling.common.http;

/**
 * Copyright: Copyright (c) 2020
 * <p>
 * Description:http状态码
 *
 * @author moling
 * @version 0.0.1
 * @date 2020/7/1:23:39
 * @since 0.0.1
 */
public interface HttpStatus {
    // --- 1xx Informational --- 消息响应

    /**
     * {@code 100 Continue} (HTTP/1.1 - RFC 2616) 继续
     */
    int CONTINUE = 100;
    /**
     * {@code 101 Switching Protocols} (HTTP/1.1 - RFC 2616) 切换协议
     */
    int SWITCHING_PROTOCOLS = 101;
    /**
     * {@code 102 Processing} (WebDAV - RFC 2518) 处理中
     */
    int PROCESSING = 102;

    // --- 2xx Success ---  成功响应

    /**
     * {@code 200 OK} (HTTP/1.0 - RFC 1945) 成功
     */
    int OK = 200;
    /**
     * {@code 201 Created} (HTTP/1.0 - RFC 1945) 已创建
     */
    int CREATED = 201;
    /**
     * {@code 202 Accepted} (HTTP/1.0 - RFC 1945) 已创建
     */
    int ACCEPTED = 202;
    /**
     * {@code 203 Non Authoritative Information} (HTTP/1.1 - RFC 2616) 未授权信息
     */
    int NON_AUTHORITATIVE_INFORMATION = 203;
    /**
     * {@code 204 No Content} (HTTP/1.0 - RFC 1945) 无内容
     */
    int NO_CONTENT = 204;
    /**
     * {@code 205 Reset Content} (HTTP/1.1 - RFC 2616) 重置内容
     */
    int RESET_CONTENT = 205;
    /**
     * {@code 206 Partial Content} (HTTP/1.1 - RFC 2616) 部分内容
     */
    int PARTIAL_CONTENT = 206;
    /**
     * {@code 207 Multi-Status} (WebDAV - RFC 2518)
     * or
     * {@code 207 Partial Update OK} (HTTP/1.1 - draft-ietf-http-v11-spec-rev-01?)
     */
    int MULTI_STATUS = 207;

    // --- 3xx Redirection --- 网络重定向

    /**
     * {@code 300 Multiple Choices} (HTTP/1.1 - RFC 2616) 多种选择
     */
    int MULTIPLE_CHOICES = 300;
    /**
     * {@code 301 Moved Permanently} (HTTP/1.0 - RFC 1945) 永久移动
     */
    int MOVED_PERMANENTLY = 301;
    /**
     * {@code 302 Moved Temporarily} (Sometimes {@code Found}) (HTTP/1.0 - RFC 1945) 临时移动
     */
    int MOVED_TEMPORARILY = 302;
    /**
     * {@code 303 See Other} (HTTP/1.1 - RFC 2616) 查看其他位置
     */
    int SEE_OTHER = 303;
    /**
     * {@code 304 Not Modified} (HTTP/1.0 - RFC 1945) 未修改
     */
    int NOT_MODIFIED = 304;
    /**
     * {@code 305 Use Proxy} (HTTP/1.1 - RFC 2616) 使用代理
     */
    int USE_PROXY = 305;

    /**
     * {@code 306 unused} (HTTP/1.1 - RFC 2616) 未使用
     */
    int UNUSED = 306;
    /**
     * {@code 307 Temporary Redirect} (HTTP/1.1 - RFC 2616) 临时重定向
     */
    int TEMPORARY_REDIRECT = 307;
    /**
     * {@code 307 Permanent Redirect} (HTTP/1.1 - RFC 2616) 永久重定向
     */
    int PERMANENT_REDIRECT = 308;

    // --- 4xx Client Error --- 客户端错误

    /**
     * {@code 400 Bad Request} (HTTP/1.1 - RFC 2616) 错误请求
     */
    int BAD_REQUEST = 400;
    /**
     * {@code 401 Unauthorized} (HTTP/1.0 - RFC 1945) 未授权
     */
    int UNAUTHORIZED = 401;
    /**
     * {@code 402 Payment Required} (HTTP/1.1 - RFC 2616) 需要付款
     */
    int PAYMENT_REQUIRED = 402;
    /**
     * {@code 403 Forbidden} (HTTP/1.0 - RFC 1945) 禁止访问
     */
    int FORBIDDEN = 403;
    /**
     * {@code 404 Not Found} (HTTP/1.0 - RFC 1945) 未找到
     */
    int NOT_FOUND = 404;
    /**
     * {@code 405 Method Not Allowed} (HTTP/1.1 - RFC 2616) 不允许使用该方法
     */
    int METHOD_NOT_ALLOWED = 405;
    /**
     * {@code 406 Not Acceptable} (HTTP/1.1 - RFC 2616) 无法接收
     */
    int NOT_ACCEPTABLE = 406;
    /**
     * {@code 407 Proxy Authentication Required} (HTTP/1.1 - RFC 2616) 需要代理身份验证
     */
    int PROXY_AUTHENTICATION_REQUIRED = 407;
    /**
     * {@code 408 Request Timeout} (HTTP/1.1 - RFC 2616)  请求超时
     */
    int REQUEST_TIMEOUT = 408;
    /**
     * {@code 409 Conflict} (HTTP/1.1 - RFC 2616) 冲突
     */
    int CONFLICT = 409;
    /**
     * {@code 410 Gone} (HTTP/1.1 - RFC 2616) 已失效
     */
    int GONE = 410;
    /**
     * {@code 411 Length Required} (HTTP/1.1 - RFC 2616) 需要内容的长度
     */
    int LENGTH_REQUIRED = 411;
    /**
     * {@code 412 Precondition Failed} (HTTP/1.1 - RFC 2616) 预处理失败
     */
    int PRECONDITION_FAILED = 412;
    /**
     * {@code 413 Request Entity Too Large} (HTTP/1.1 - RFC 2616) 请求实体过长
     */
    int REQUEST_TOO_LONG = 413;
    /**
     * {@code 414 Request-URI Too Long} (HTTP/1.1 - RFC 2616) 请求网址过长
     */
    int REQUEST_URI_TOO_LONG = 414;
    /**
     * {@code 415 Unsupported Media Type} (HTTP/1.1 - RFC 2616) 媒体类型不支持
     */
    int UNSUPPORTED_MEDIA_TYPE = 415;
    /**
     * {@code 416 Requested Range Not Satisfiable} (HTTP/1.1 - RFC 2616) 请求范围不合要求
     */
    int REQUESTED_RANGE_NOT_SATISFIABLE = 416;
    /**
     * {@code 417 Expectation Failed} (HTTP/1.1 - RFC 2616) 预期结果失败
     */
    int EXPECTATION_FAILED = 417;

    /**
     * Static constant for a 418 error.
     * {@code 418 Unprocessable Entity} (WebDAV drafts?)
     * or {@code 418 Reauthentication Required} (HTTP/1.1 drafts?)
     */
    // not used
//     int UNPROCESSABLE_ENTITY = 418;

    /**
     * Static constant for a 419 error.
     * {@code 419 Insufficient Space on Resource}
     * (WebDAV - draft-ietf-webdav-protocol-05?)
     * or {@code 419 Proxy Reauthentication Required}
     * (HTTP/1.1 drafts?)
     */
    int INSUFFICIENT_SPACE_ON_RESOURCE = 419;
    /**
     * Static constant for a 420 error.
     * {@code 420 Method Failure}
     * (WebDAV - draft-ietf-webdav-protocol-05?)
     */
    int METHOD_FAILURE = 420;
    /**
     * {@code 422 Unprocessable Entity} (WebDAV - RFC 2518)
     */
    int UNPROCESSABLE_ENTITY = 422;
    /**
     * {@code 423 Locked} (WebDAV - RFC 2518)
     */
    int LOCKED = 423;
    /**
     * {@code 424 Failed Dependency} (WebDAV - RFC 2518)
     */
    int FAILED_DEPENDENCY = 424;

    // --- 5xx Server Error --- 服务器端错误

    /**
     * {@code 500 Server Error} (HTTP/1.0 - RFC 1945) 内部服务器错误
     */
    int INTERNAL_SERVER_ERROR = 500;
    /**
     * {@code 501 Not Implemented} (HTTP/1.0 - RFC 1945) 未实现
     */
    int NOT_IMPLEMENTED = 501;
    /**
     * {@code 502 Bad Gateway} (HTTP/1.0 - RFC 1945) 网关错误
     */
    int BAD_GATEWAY = 502;
    /**
     * {@code 503 Service Unavailable} (HTTP/1.0 - RFC 1945) 服务不可用
     */
    int SERVICE_UNAVAILABLE = 503;
    /**
     * {@code 504 Gateway Timeout} (HTTP/1.1 - RFC 2616) 网关超时
     */
    int GATEWAY_TIMEOUT = 504;
    /**
     * {@code 505 HTTP Version Not Supported} (HTTP/1.1 - RFC 2616) http版本不受支持
     */
    int HTTP_VERSION_NOT_SUPPORTED = 505;

    /**
     * {@code 507 Insufficient Storage} (WebDAV - RFC 2518)
     */
    int INSUFFICIENT_STORAGE = 507;
}
